'''
要先* 安装 virtualenv，pip install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv
进入 venv 文件夹 cd venv
激活虚拟环境 scripts\activate，注意，这里是反斜杠
安装 flask pip install -i https://pypi.tuna.tsinghua.edu.cn/simple flask，注意，如果已经设定了默认使用国内镜像，则可直接使用 pip install flask

'''

from flask import Flask, render_template
from data import *
from areacount import *
from pie import *
from bookbar import *
from bookcatter import *
from bookpie import *
from bookline import *
from bookfunnel import *
from bookpictorialbar import *
from 词云 import *
from ybt import *
from npie import *
app = Flask(__name__)


@app.route('/')
def index():
    data = SourceData()
    return render_template('index.html', form=data, title=data.title)


@app.route('/corp')
def corp():
    data = CorpData()
    return render_template('index.html', form=data, title=data.title)


@app.route('/job')
def job():
    data = JobData()
    return render_template('index.html', form=data, title=data.title)

@app.route('/chinaCitymap')
def map():
  AreaCount()
  return render_template('chinaCitymap.html', name="Alex")
@app.route('/pie')
def pie():
    Salary()
    return render_template('chinaCitymap1.html', name="Alex1")

@app.route('/bookbar1')
def bookbar():
    Bookbar()
    return render_template('bar_custom_bar_color1.html', name="Alex2")
@app.route('/bookpie')
def bookpie():
    Bookpie()
    return render_template('book_pie.html', name="Alex3")
@app.route('/bookcatter')
def bookcatter():
    Bookcatter()
    return render_template('effectscatter_symbol.html', name="Alex4")
@app.route('/bookline')
def bookline():
    Bookline()
    return render_template('basic_line_chart.html', name="Alex5")
@app.route('/bookfunnel')
def bookfunnel():
    Bookfunnel()
    return render_template('funnel_sort_ascending.html', name="Alex6")
@app.route('/pictorialbar_base')
def bookpictorialbar():
    Bookpictorialbar()
    return render_template('pictorialbar_base.html', name="Alex7")

@app.route('/yb')
def yb():
    Yb()
    return render_template('yb.html', name="Alex8")
@app.route('/np1')
def np1():
    Np()
    return render_template('NP.html', name="Alex9")


if __name__ == "__main__":
    app.run(host='0.0.0.0', debug=False)
